feat: bedrock-oss-provisioned-throughput-polling#5893
Open
lucasjia-aws wants to merge 3 commits into
Open
Conversation
07f6443 to
456b788
Compare
456b788 to
d6636a0
Compare
… method - deploy() for non-Nova models now waits for import job completion and returns job details. Model is ready for on-demand inference after deploy(). - Removed mandatory CreateProvisionedModelThroughput from deploy() flow. - create_provisioned_throughput() remains as a standalone public method for users who need dedicated throughput. - Updated unit tests to verify deploy() no longer calls PT APIs. - Added integ test for import job polling (test_deploy_oss_model_waits_for_import_completion). - Added skipped integ test for create_provisioned_throughput() pending PT MU quota approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add synchronous polling for Bedrock OSS (non-Nova) model deployments.
Previously,
BedrockModelBuilder.deploy()for OSS models would fire off acreate_model_import_jobcall and return immediately, leaving the user to manually wait for the import to complete. This PR adds polling sodeploy()waits until the import job completes and the model is ready for on-demand inference, matching the synchronous behavior of the Nova deployment path.CreateProvisionedModelThroughputis provided as a separate public method (create_provisioned_throughput()) for users who need dedicated throughput, rather than being mandatory in the deploy flow.Changes
Implementation (
bedrock_model_builder.py):deploy()now waits for the import job to complete and returns the job details. Model is ready for on-demand inference afterdeploy()returns.create_provisioned_throughput()— creates provisioned throughput for an imported model and polls until InService. This is a standalone method, not called bydeploy()._wait_for_import_job_complete(),_wait_for_provisioned_throughput_in_service().Unit tests (
test_bedrock_model_builder.py):deploy()waits for import completion and does NOT call PT APIs.TestWaitForImportJobComplete,TestCreateProvisionedThroughput,TestWaitForProvisionedThroughputInService.Integration test (
test_bedrock_provisioned_throughput.py):test_deploy_oss_model_waits_for_import_completion).create_provisioned_throughput()— pending PT MU quota approval on CI account.Testing
deploy()validated locally against real Bedrock APIs — import job creation, polling to completion (~6 min), and model readiness all confirmed.CreateProvisionedModelThroughputAPI call validated locally (passes parameter validation), blocked only by account-level service quota (0 MU limit). Integ test marked as skip until quota is granted.